/*     */ package com.lmpop.trade.ti_resume_delivery;
/*     */ 
/*     */ import com.lmpop.frame.QueryList;
/*     */ import com.lmpop.frame.SysMap;
/*     */ import com.lmpop.frame.TradeInterf;
/*     */ import com.lmpop.frame.dao.DbmInterf;
/*     */ import com.lmpop.frame.exp.ApplicationException;
/*     */ import com.lmpop.frame.util.RandomID;
/*     */ import java.io.PrintStream;
/*     */ import java.util.Hashtable;
/*     */ import java.util.List;
/*     */ 
/*     */ public class Ti_resume_deliveryInfo
/*     */   implements TradeInterf
/*     */ {
/*     */   QueryList queryList;
/*     */ 
/*     */   public Ti_resume_deliveryInfo()
/*     */   {
/*  16 */     this.queryList = new QueryList();
/*     */   }
/*     */ 
/*     */   public SysMap insert(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  25 */     Ti_resume_delivery ti_resume_delivery = new Ti_resume_delivery();
/*  26 */     RandomID randomID = new RandomID();
/*  27 */     String trade_id = randomID.GenTradeId();
/*  28 */     System.out.print("==============trade_id==========" + trade_id);
/*  29 */     ti_resume_delivery.setTrade_id(trade_id);
/*  30 */     ti_resume_delivery.setInfo_id(map.getString("info_id"));
/*  31 */     ti_resume_delivery.setReume_id(map.getString("reume_id"));
/*  32 */     ti_resume_delivery.setContact_phone(map.getString("contact_phone"));
/*  33 */     ti_resume_delivery.setReume_title(map.getString("reume_title"));
/*  34 */     ti_resume_delivery.setReume_desc(map.getString("reume_desc"));
/*  35 */     ti_resume_delivery.setContact_addr(map.getString("contact_addr"));
/*  36 */     ti_resume_delivery.setReume_email(map.getString("reume_email"));
/*  37 */     ti_resume_delivery.setReume_name(map.getString("reume_name"));
/*  38 */     ti_resume_delivery.setRsrv_str1(map.getString("rsrv_str1"));
/*  39 */     ti_resume_delivery.setRsrv_str2(map.getString("rsrv_str2"));
/*  40 */     ti_resume_delivery.setRsrv_str3(map.getString("rsrv_str3"));
/*  41 */     ti_resume_delivery.setCust_id(map.getString("cust_id"));
/*  42 */     ti_resume_delivery.setIn_date(map.getString("in_date"));
/*  43 */     ti_resume_delivery.setUser_id(map.getString("user_id"));
/*  44 */     ti_resume_delivery.setRemark(map.getString("remark"));
/*     */ 
/*  46 */     String result_code = "0";
/*     */     try {
/*  48 */       insert(dbmMgr, ti_resume_delivery);
/*     */     } catch (ApplicationException e) {
/*  50 */       e.printStackTrace();
/*  51 */       result_code = "1";
/*     */     }
/*  53 */     map.setString("result_code", result_code);
/*  54 */     return map;
/*     */   }
/*     */ 
/*     */   public void insert(DbmInterf dbmMgr, Ti_resume_delivery ti_resume_delivery)
/*     */     throws ApplicationException
/*     */   {
/*  63 */     dbmMgr.update("insertTi_resume_delivery", ti_resume_delivery);
/*     */   }
/*     */ 
/*     */   public SysMap delete(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  73 */     String pkid_string = map.getString("pkid");
/*  74 */     String result_code = "0";
/*     */     try {
/*  76 */       if (!pkid_string.equals("")) {
/*  77 */         String[] pkStr = pkid_string.split("\\|");
/*  78 */         for (int i = 0; i < pkStr.length; i++) {
/*  79 */           if (pkStr[i].equals("")) continue; delete(dbmMgr, pkStr[i]);
/*     */         }
/*     */       }
/*     */     } catch (ApplicationException e) {
/*  83 */       e.printStackTrace();
/*  84 */       result_code = "1";
/*     */     }
/*  86 */     map.setString("result_code", result_code);
/*  87 */     return map;
/*     */   }
/*     */ 
/*     */   public void delete(DbmInterf dbmMgr, String pkid)
/*     */     throws ApplicationException
/*     */   {
/*  96 */     dbmMgr.update("deleteTi_resume_delivery", pkid);
/*     */   }
/*     */ 
/*     */   public SysMap update(DbmInterf dbmMgr, SysMap map)
/*     */   {
/* 105 */     Ti_resume_delivery ti_resume_delivery = new Ti_resume_delivery();
/* 106 */     ti_resume_delivery.setTrade_id(map.getString("trade_id"));
/* 107 */     ti_resume_delivery.setInfo_id(map.getString("info_id"));
/* 108 */     ti_resume_delivery.setReume_id(map.getString("reume_id"));
/* 109 */     ti_resume_delivery.setContact_phone(map.getString("contact_phone"));
/* 110 */     ti_resume_delivery.setReume_title(map.getString("reume_title"));
/* 111 */     ti_resume_delivery.setReume_desc(map.getString("reume_desc"));
/* 112 */     ti_resume_delivery.setContact_addr(map.getString("contact_addr"));
/* 113 */     ti_resume_delivery.setReume_email(map.getString("reume_email"));
/* 114 */     ti_resume_delivery.setReume_name(map.getString("reume_name"));
/* 115 */     ti_resume_delivery.setRsrv_str1(map.getString("rsrv_str1"));
/* 116 */     ti_resume_delivery.setRsrv_str2(map.getString("rsrv_str2"));
/* 117 */     ti_resume_delivery.setRsrv_str3(map.getString("rsrv_str3"));
/* 118 */     ti_resume_delivery.setCust_id(map.getString("cust_id"));
/* 119 */     ti_resume_delivery.setIn_date(map.getString("in_date"));
/* 120 */     ti_resume_delivery.setUser_id(map.getString("user_id"));
/* 121 */     ti_resume_delivery.setRemark(map.getString("remark"));
/*     */ 
/* 123 */     String result_code = "0";
/*     */     try {
/* 125 */       update(dbmMgr, ti_resume_delivery);
/*     */     } catch (ApplicationException e) {
/* 127 */       e.printStackTrace();
/* 128 */       result_code = "1";
/*     */     }
/* 130 */     map.setString("result_code", result_code);
/* 131 */     return map;
/*     */   }
/*     */ 
/*     */   public void update(DbmInterf dbmMgr, Ti_resume_delivery ti_resume_delivery)
/*     */     throws ApplicationException
/*     */   {
/* 140 */     dbmMgr.update("updateTi_resume_delivery", ti_resume_delivery);
/*     */   }
/*     */ 
/*     */   public List getListByPage(Object obj, int start, int limit)
/*     */   {
/* 150 */     Hashtable ti_resume_delivery = (Hashtable)obj;
/* 151 */     if (start == 0)
/* 152 */       start = 0;
/*     */     else {
/* 154 */       start = (start - 1) * limit;
/*     */     }
/* 156 */     ti_resume_delivery.put("start", Integer.valueOf(start));
/* 157 */     ti_resume_delivery.put("limit", Integer.valueOf(limit));
/* 158 */     return this.queryList.getList("getListByTi_resume_deliveryPage", ti_resume_delivery);
/*     */   }
/*     */ 
/*     */   public int getCountByObj(Object obj)
/*     */   {
/* 169 */     Hashtable ti_resume_delivery = (Hashtable)obj;
/* 170 */     List list = this.queryList.getList("getCountByObjTi_resume_delivery", obj);
/* 171 */     int count = 0;
/* 172 */     if ((list != null) && (list.size() > 0)) {
/* 173 */       Hashtable newsMap = (Hashtable)list.get(0);
/* 174 */       if ((newsMap.get("count") != null) && (!newsMap.get("count").toString().equals(""))) {
/* 175 */         count = Integer.parseInt(newsMap.get("count").toString());
/*     */       }
/*     */     }
/* 178 */     return count;
/*     */   }
/*     */ 
/*     */   public List getListByPk(String pk)
/*     */   {
/* 188 */     return this.queryList.getList("getTi_resume_deliveryByPk", pk);
/*     */   }
/*     */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.trade.ti_resume_delivery.Ti_resume_deliveryInfo
 * JD-Core Version:    0.6.0
 */